package com.spzx.order.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.order.domain.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * Package: com.spzx.order.api
 *
 * @author xiongkunYang
 * @description:
 * @since 2025/6/9 11:45
 */
@FeignClient(
        contextId = "remoteUserInfoService",
        value = ServiceNameConstants.ORDER_SERVICE,
        fallbackFactory = RemoteOrderInfoFallbackFactory.class,
        path = "/orderInfo"
)
public interface RemoteOrderInfoService {

    @GetMapping("/getByOrderNo/{orderNo}")
    R<OrderInfo> getByOrderNo(@PathVariable("orderNo") String orderNo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}